<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            border: none;
            outline: none;
            list-style: none;
            text-decoration: none;
        }

        .publictitle {
            padding: 30px;
            font-size: 20px;
        }

        .publiccontrap {
            margin: 0 20px 20px;
            padding: 20px;
            background-color: #333;
            white-space: pre-wrap;
            word-break: break-all;
            color: white;
            border-radius: 20px;
        }
    </style>
</head>

<body>
    <div id="app">

        <top_tp></top_tp>
        <left_tp></left_tp>
        <contwrap_tp v-if="contwrapshow"></contwrap_tp>

    </div>
    <div desc="获取模板使用，直接忽略" id="TEMPLATE" style="position: relative;overflow: hidden;height: 0;"></div>
    <script src="./assets/vue3.js"></script>
    <script src="./assets/jquery-1.12.4.js"></script>
    <script>
        //引入组件
        /*获取组件*/
        window.topcoms = () => {
            return new Promise((resv, rej) => {
                $.ajax({
                    url: './components/top.html', dataType: 'html', success: (res) => {
                        $('#TEMPLATE').append(res); resv()
                    }
                })
            })
        };
        window.leftcoms = () => {
            return new Promise((resv, rej) => {
                $.ajax({
                    url: './components/left.html', dataType: 'html', success: (res) => {
                        $('#TEMPLATE').append(res); resv()
                    }
                })
            })
        };
        window.contwrapcoms = () => {
            return new Promise((resv, rej) => {
                $.ajax({
                    url: './components/contwrap.html', dataType: 'html', success: (res) => {
                        $('#TEMPLATE').append(res); resv()
                    }
                })
            })
        };
        /*组件*/
        topcoms().then(() => {
            return contwrapcoms()
        }).then(() => {
            return leftcoms()
        }).then(() => {
            //实例化
            setTimeout(() => {
                window.app = Vue.createApp({
                    data() {
                        return {
                            getifnomarginleft: 0,
                            navchange: '',
                            contwrapshow: 0
                        }
                    },
                    components: {
                        top_tp,
                        left_tp,
                        contwrap_tp,
                    }
                })
                app.mount('#app')
            })
        })
    </script>
</body>

</html>